import type { Form } from '../wyg-form/interface';
export const options = [
  {
    value: 'beijing',
    label: 'Beijing',
    children: [
      {
        value: 'chaoyang',
        label: 'ChaoYang',
        children: [
          {
            value: 'datunli',
            label: 'Datunli',
          },
        ],
      },
      {
        value: 'haidian',
        label: 'Haidian',
      },
      {
        value: 'dongcheng',
        label: 'Dongcheng',
      },
      {
        value: 'xicheng',
        label: 'Xicheng',
        children: [
          {
            value: 'jinrongjie',
            label: 'Jinrongjie',
          },
          {
            value: 'tianqiao',
            label: 'Tianqiao',
          },
        ],
      },
    ],
  },
  {
    value: 'shanghai',
    label: 'Shanghai',
    children: [
      {
        value: 'huangpu',
        label: 'Huangpu',
      },
    ],
  },
];

export const formConfig: Form.FieldItem[] = [
  {
    field: 'name',
    label: '姓名',
    required: true,
    value: '波波',
    component: 'input',
    allowClear: true,
    colProps: {
      span: 20,
      offset: 100,
    },
  },
  {
    field: 'age',
    label: '年龄',
    required: true,
    value: '18',
    component: 'input',
    allowClear: true,
  },
  {
    field: 'hobby',
    label: '爱好',
    required: true,
    value: '',
    component: 'input',
  },
  {
    field: 'school',
    label: '学校',
    required: true,
    value: '',
    component: 'input',
  },
  {
    field: 'sex',
    label: '性别',
    required: true,
    component: 'select',
    lists: [
      {
        label: '男',
        value: 'M',
      },
      {
        label: '女',
        value: 'F',
      },
    ],
  },
  {
    field: 'birthTime',
    label: '时间',
    component: 'time',
  },
  {
    field: 'birthDate',
    label: '出生日期',
    component: 'date',
  },
  {
    field: 'rangeDate',
    label: '日期范围',
    component: 'rangeDate',
  },
  {
    field: 'address',
    label: '地址',
    component: 'cascader',
    options,
  },
  {
    field: 'desc',
    label: '自我介绍',
    required: true,
    value: '',
    component: 'input',
  },
];
